package com.bw.controller;

import com.bw.bean.Movie;
import com.bw.service.MovieService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

@RestController
public class MovieController {
    @Autowired
    MovieService service;

    @RequestMapping("list")
    public List<Movie> list(){
        List<Movie> list = service.list();
        return list;
    }

    @RequestMapping("like")
    public List<Movie> likeList(){
        List<Movie> list = service.likeList("1");
        return list;
    }

    @RequestMapping("aut")
    public List<Movie> autList(){
        List<Movie> list = service.autList("三");
        return list;
    }

    @RequestMapping("area")
    public List<Movie> areaList(){
        List<Movie> list = service.areaList("2020-10-01", "2020-11-31");
        return list;
    }

}
